#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
    int n = 0;
    scanf("%d", &n);
    int N = 1000;
    int arr[N];
    arr[0] = 2;
    int i = 0;
    int sum = 0;
    for (i = 1; i < 1000; i++)
    {
        arr[i] = arr[i - 1] + 3;
    }
    for (i = 0; i < n; i++)
    {
        sum = sum + arr[i];
    }
    printf("%d", sum);
    return 0;
}